package com.siao.applications
{
	import com.siao.mvc.core.IState;
	
	/**
	 * 应用程序
	 * @author SiaoLeon
	 */
	public class Application extends SingleModule
	{
		// -------------------------------------------------------------------------------------------------------- 静态常量
		
		// -------------------------------------------------------------------------------------------------------- 静态变量
		
		// -------------------------------------------------------------------------------------------------------- 静态方法
		
		// -------------------------------------------------------------------------------------------------------- 静态函数
		
		// -------------------------------------------------------------------------------------------------------- 属性
		
		// -------------------------------------------------------------------------------------------------------- 变量
		
		// -------------------------------------------------------------------------------------------------------- 构造
		
		/**
		 * 构造函数
		 */
		public function Application(root:IState=null)
		{
			super(root);
		}
		
		// -------------------------------------------------------------------------------------------------------- 方法
		
		/**
		 * 应用程序启动方法
		 */
		public function startup():void
		{
		}
		
		// -------------------------------------------------------------------------------------------------------- 函数
		
		override protected function onAddedToStage():void
		{
			if (this.parent != null)
			{
				ApplicationManager.instance.startup(this);
			}
			
			super.onAddedToStage();
		
		}
	
	}
}
